MONGOC_INCLUDE=/usr/local/include/libmongoc-1.0/
MONGOC_LIB=/usr/local/lib
BSON_INCLUDE=/usr/local/include/libbson-1.0/
CC=g++ -g

FIND_CMD=-Wl,-rpath=

t: main.o MyMongoC.o
	$(CC) main.o MyMongoC.o -o t -L$(MONGOC_LIB) -lmongoc-1.0 -lbson-1.0 $(FIND_CMD)$(MONGOC_LIB)

main.o: main.cpp
	$(CC) -c main.cpp -o main.o -I$(MONGOC_INCLUDE) -I$(BSON_INCLUDE)

MyMongoC.o: MyMongoC.cpp
	$(CC) -c MyMongoC.cpp -o MyMongoC.o -I$(MONGOC_INCLUDE) -I$(BSON_INCLUDE)

clean:
	rm -rf *.o
	rm -rf t